Repository navigation
make: sort source wildcards so the PRG is locale-independent (#301) - #311
Merged
Merged
Conversation
make 3.81 returns $(wildcard) in locale collation order and the lists are the ld65 object order, so ip65-onchip, uci-onchip and uci-comb each had two PRG hashes. $(sort) is byte order. New hashes differ from v0.5.1. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…er relink (#301) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ndition, wording nits (#301) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
JC-000
force-pushed
the
fix/301-locale-link-order
branch
from
October 15, 2026 19:27
6294297 to
bfa0ed7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #301
Cause (verified)
GNU make 3.81 returns
$(wildcard)hits in locale collation order. Probe Makefile with tls13.s tls_cert.s tls_record.s tls_record_io.s:LC_ALL=C:tls13.s tls_cert.s tls_record.s tls_record_io.sLC_ALL=en_US.UTF-8:tls_cert.s tls_record_io.s tls_record.s tls13.s$(sort $(wildcard ...)): byte order under both.Fix
$(sort ...)on the three wildcards (TOP_SRCS,CRYPTO_SRCS_ALL,CRYPTO_SHARED_SRCS). Audit: no other wildcard,lsor glob feeds ld65/ar65 (build_x25519.shuses explicit arrays;write_manifest.shpipes throughsort, which is locale-collated: harmless today (same order for its 7 names across C/en_US/cs_CZ/sv_SE) but not locale-safe;libs/nistcurvesMakefile has none).Round 2 (rev-311)
src/crypto/*.s(chacha20 after hmac_drbg); C and en_US agree there. On master cs_CZ is a third hash per product.src/crypto/shared/*.sis reordered by no locale tried, so its sort is defensive and not pinned.flags.stamp(OBJECTS=$(ALL_OBJS), 1 line): a build/ left by pre-fix master is relinked instead of "Nothing to be done". Newtest_stale_link_order_is_rebuilt_to_the_clean_hash.git merge-treeagainst its head shows 0 conflicts.Red-green (round 1)
New
test_prg_is_independent_of_the_build_locale(intools/test_build_flags_stamp.py, already in pytest testpaths) first proves the two locales ordersrc/*.sdifferently, then builds UCI onchip under each and compares sha256.{'C': '5e709d88...', 'en_US.UTF-8': '924132de...'}PASSED: 0 failure(s) (18/18 executed); pytest on stamp + runner_coverage + pytest_boundary: 34 passed.New release hashes (byte-order link; DIFFER from v0.5.1)
make packageunderLC_ALL=CandLC_ALL=en_US.UTF-8, identical:1c377d34343150f59f536aeba3a468c373dbebf3a4b5ab326a5ef6b7072fbe8198a3d882ddb7008f6f3aa646d1cf984279840fd22e22b3dd0f80967b53cb730d6b95c32955860c1cbcfd12e5dedc2ef732f1a189f6c639c716e2e2ea91f59430Hardware (U64E, 48 MHz,
rig_https_banner.py, en.wikipedia.org/wiki/Commodore_64, typed host)98a3d882...: PASS, HTTP 200, 759,171 B consumed == Content-Length6b95c329...: PASS, HTTP 200, 759,171 B consumed == Content-Lengthmake package-verify: 14/14 checks passed, RELEASE ARTIFACTS VERIFIEDOverlap
Overlaps #306 in
tools/test_build_flags_stamp.pyand the Makefile stamp area; may need a rebase after #306 merges (it was still open when this was opened).🤖 Generated with Claude Code